export const A90 = Math.PI / 2;
export const isTouch = "ontouchstart" in window;
export const mouseEvents = isTouch
  ? {
      down: "touchstart",
      move: "touchmove",
      up: "touchend",
      over: "touchstart",
      out: "touchend",
    }
  : {
      down: "mousedown",
      move: "mousemove",
      up: "mouseup",
      over: "mouseover",
      out: "mouseout",
    };
// Contansts used for each corner
//   | tl * tr |
// l | *     * | r
//   | bl * br |

export const corners = {
  backward: ["bl", "tl"],
  forward: ["br", "tr"],
  all: ["tl", "bl", "tr", "br", "l", "r"],
};
// Display values

export const displays = ["single", "double"];
// Direction values

export const directions = ["ltr", "rtl"];
// Default options

export const turnOptions = {
  // Enables hardware acceleration

  acceleration: true,

  // Display

  display: "double",

  // Duration of transition in milliseconds

  duration: 600,

  // First page

  page: 1,

  // Enables gradients

  gradients: true,

  // Corners used when turning the page

  turnCorners: "bl,br",

  // Events

  when: null,
};

export const flipOptions = {
  // Size of the active zone of each corner

  cornerSize: 100,
};
// Number of pages in the DOM, minimum value: 6

export const pagesInDOM = 6;
